Trò chơi đua xe động vật trong UNITY Engine
114.948 lượt xem;
- InterpolationElasticIn.cs
- Interpolations /
- Bapk /
- Scripts /
- Assets /
- project /
1 using UnityEngine;
2 using System.Collections;
3
4 public class InterpolationElasticIn : InterpolationElastic {
5 public InterpolationElasticIn(float value, float power) : base(value, power)
6 {
7 }
8
9 public float apply(float a)
10 {
11 return Mathf.Pow(value, power * (a - 1)) * Mathf.Sin(a * 20) * 1.0955f;
12 }
13 }
2 using System.Collections;
3
4 public class InterpolationElasticIn : InterpolationElastic {
5 public InterpolationElasticIn(float value, float power) : base(value, power)
6 {
7 }
8
9 public float apply(float a)
10 {
11 return Mathf.Pow(value, power * (a - 1)) * Mathf.Sin(a * 20) * 1.0955f;
12 }
13 }